package apcsif;    
import java.util.Scanner;

/**
 * Write a description of class Sys here.
 * 
 * @author (your name)
 * @version (a version number or a date)
 */
public class Sys {
	static String str2 = "";
 	static Scanner scan = new Scanner(System.in);
	public Sys() {

	}

	// takes an int for seconds and delays the system by that long
	public static void delay(double secs) {
		secs = secs * 1000;
		try {
			Thread.currentThread().sleep((int) secs);
		} catch (InterruptedException ie) {
		}
	}

	public static String split1(String str) {
		str2 = str;
		Bad: for (int c = 0; c < str.length() - 1; c++) {
			if (str.charAt(c) == ' ') {
				str2 = str.substring(0, c);
				break Bad;
			}
		}
		return str2;
	}

	public static String split2(String str) {
		if (str.contains(" ") == false){
			str2 = "";
		}
		else{
		Bad: for (int c = 0; c < str.length() - 1; c++) {
			if (str.charAt(c) == ' ') {
				str2 = str.substring(c + 1);
				break Bad;
			}
			
		}
		}
		return str2;
	}

	public static void sp(String input) {
		for (int c = 0; c < input.length(); c++) {
			System.out.print(input.charAt(c));
			delay(.05);
		}
		System.out.println();
	}
	public static String miniPars()
	{
		System.out.print("/"); //#change me
		String parsMe = scan.nextLine();
		switch(parsMe.toLowerCase())
		{
			case "u": case "up":
				return "u";
			case "n": case "north": 
				return "n";
			default:
				return parsMe;
		}
	}

}
